package com.note.es.entity;

import java.util.Objects;

/**
 * @ClassName: IndexEntity
 * @Description:
 * @Author: yfeng
 * @Date: 2018/11/15 2:51 PM
 */
public class IndexEntity {
    private String name;
    private String type;
    private String settings;
    private String mappings;

    public IndexEntity (){}

    public IndexEntity(String name,String type){
        this.name=name;
        this.type = type;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getSettings() {
        return settings;
    }

    public void setSettings(SettingEntity settings) {
        this.settings = Objects.requireNonNull(settings, "setting can not null").toDSL();
    }
    public void setSettings(String settings) {
        this.settings = Objects.requireNonNull(settings, "setting can not null");
    }
    public String getMappings() {
        return mappings;
    }

    public void setMappings(String mappings) {
        this.mappings = mappings;
    }

    @Override
    public String toString() {
        return "IndexEntity [name=" + name + ", type=" + type + ", settings=" + settings + ", mappings="
                + mappings + "]";
    }
}
